package com.liao.library.lifecycle.viewmodel;

import com.liao.library.annotation.NonNull;
import ohos.aafwk.ability.AbilityPackage;

public class HarmonyViewModel extends ViewModel{
    private AbilityPackage mApplication;

    public HarmonyViewModel(@NonNull AbilityPackage mApplication) {
        this.mApplication = mApplication;
    }

    @SuppressWarnings({"TypeParameterUnusedInFormals", "unchecked"})
    @NonNull
    public <T extends AbilityPackage> T getApplication() {
        return (T) mApplication;
    }

    @Override
    protected void onCleared() {
        super.onCleared();
    }
}
